<%@ include file="/taglibs.jsp" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<head>
		<title>北京邮电大学学生党员在线学习中心</title>

		<link href="${ctx}/css/jquery.treeview.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/css/pagination.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${ctx }/treeView/jquery.cookie.js"></script>
		<script type="text/javascript" src="${ctx }/treeView/jquery.treeview.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#tree").treeview({
				collapsed: true,
				animated: "fast",
				control:"#sidetreecontrol",
				prerendered: true,
				persist: "location"
			});
		})
	</script>
	<script type="text/javascript">
			function goToPage(pageNow){
				
				var form = document.getElementById("form1");
				var indexPage = document.getElementById("pageNow");
				
				indexPage.value=pageNow;
				
				form.submit();
				
			}
			$(function(){
				var focusBranchId = '<%=request.getAttribute("focusBranchId") %>';
				$('#subMenuList_' + focusBranchId).attr('class', 'focus');
				
				// Change pageLabel
				var data = $('#subMenuList_' + focusBranchId).text();
				$('#pageLabel').text(data);
			});
		</script>
</head>

<s:if test="#session.session_user!=null">
<div id="nav_bar">
    <img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt=""/>
    <div id="welcome_label">欢迎您，&nbsp;<s:property value="#session.session_user.studentName" />!</div>
    <img id="nav_bar_seperator" src="../../../styles/nav_bar_seperator.png" alt=""/>
    <div id="nav_location">
        <img id="nav_bar_point" src="../../../styles/nav_bar_point.png" alt="" />
        <div id="nav_cur_location">当前位置：&nbsp;<a href="${ctx}/UserAction_indexAction">首页</a>&nbsp;&nbsp;>&nbsp;&nbsp;<a href="${ctx}/PartyNews_spiritNews">党建动态</a>&nbsp;&nbsp;>&nbsp;&nbsp;院系风采</div>
    </div>
    <img style="float:right; width:5px;" src="../../../styles/nav_bar_right.png" alt=""/>
    <a id="nav_logout" href="${ctx}/logoutAction">[安全退出]</a>
</div>
<div style="clear:both; height:5px;">&nbsp;</div>
</s:if>
<div style="min-height:450px;">
	<!-- left -->
	<div id="side_menu" style="min-height: 548px;">
	    <div id="side_menu_title">
	        <img src="../../../styles/side_menu_title_img.png" alt="" />
	        <span>党建动态</span>
	    </div>
	    <div id="side_menu_title_bottom">&nbsp;</div>
	    <div id="sideMenu1" class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx }/PartyNews_spiritNews">上级精神</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div id="sideMenu2" class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx }/PartyNews_schoolNews">学校要闻</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu_focus">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx }/PartyNews_collegeNews">院系风采</a>
	    </div>
	    <ul>
	        <s:iterator value="#request.level2Branches">
	         <li>
	            <div class="side_sub_menu_point">&nbsp;</div>
	            <a id="subMenuList_<s:property value='id' />" href="${ctx}/PartyNews_collegeNews?branchId=<s:property value='id' />" class="unfocus"><s:property value="branchName" /></a>
	        </li>	
	        </s:iterator>
	    </ul>
	</div>
	
	<div id="main_content">
	    <div id="main_content_title">
	        <img src="../../../styles/content_title_img.png" alt="" />
	        
	        <span><span id="pageLabel" style="color:#874300;"></span>院系风采</span>
	        
	        
	        
	    </div>
	    <div class="main_content_title_bottom">&nbsp;</div>
	    <form id="form1"  action="${ctx }/PartyNews_collegeNews?branchId=<s:property value="#request.branchId"/>" method="post">
			<table >
				<tr>
					<td style="width:120px;text-align:center;">请输入查询内容：</td>
					<td>
						<input type="text" name="titleOnQuery" size=60 value="<s:property value="titleOnQuery"/>">
					</td>
					<td style="width:60px;text-align:center;">
						<input type="submit"  name="button" id="button" class="input-button"  value="查询"/>
					</td>
				</tr>
			</table>
		<input id="pageNow" type="hidden" name="pageNow" value="1"/>
		</form>
		<div style="clear:both; height:10px;">&nbsp;</div>
		
		
		<ul class="news-list-table" >
			<s:iterator value="partyNews">
			<li><s:date name="postTime" format="yyyy-MM-dd"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="PartyNews_viewNews?id=<s:property value="id"/>" target="_blank">
			 <s:if test="%{title.length()>40}">
					<s:property value="title.substring(0,40)+'...'" />
			 </s:if> 
			 <s:else>
					<s:property value="title" />
			 </s:else> 
			</a>&nbsp;&nbsp;<span style="color:#404040;">[访问人数：<s:property value="visitedCount"/>]</span></li>
			</s:iterator>
		</ul>
		
		
		
		
		<%-- <table  class="list-table">
			<tr>
				<th>标题</th>
				<th>发布者</th>
				<th>发布时间</th>
				<th>所属院系</th>
				<th>访问人数</th>
			</tr>
			<s:iterator value="partyNews" status="st">
			<tr>
				<td>
					<a href="PartyNews_viewNews?id=<s:property value="id"/>" target="_blank"> <s:property value="title"/>  </a>
				</td>
				<td>
					<s:property value="adminNoToNameMap.get(posterNo)"/>	
				</td>
				<td>
					 <s:date name="postTime" format="yyyy年MM月DD日"/>
				</td>
				<td>
					<s:property value="getBranchNameByBranchId(branchId)"/>
				</td>
				<td>
					 <s:property value="visitedCount"/>
				</td>
			</tr>
			</s:iterator>
		</table> --%>
		
		
		
		
		
		
		<div style="clear:both; height:10px;"></div>
		<div style="margin-left:0; text-align: center;">
			<s:property value="paginationCode" escape="false"/>
		</div>
	</div>
	<div style="clear:both;">&nbsp;</div>
</div>
				
						